SRC_FILES = $(wildcard *.c)
OBJ_FILES = $(patsubst %.c, %.o, $(SRC_FILES))
TAG_FILES = main

CC     = gcc
CFLAGS = -Wall

.SECONDARY:
.SUFFIXES: 
.SUFFIXES: % %.o

ALL : $(TAG_FILES)
	@echo "Compiler : $(CC)"
% : %.o
	$(CC) $(CFLAGS) -o $@ $< -lcwesalib
%.o : %.c
	$(CC) $(CFLAGS) -o $@ -c $< 

.PHONY: clean
clean : 
	@rm -rf $(OBJ_FILES) $(TAG_FILES)

